1. Field of the Invention
The present invention relates to embedded devices. More specifically, the present invention relates to a method and apparatus for profiling a virtual machine on an embedded device.
2. Related Art
Today, developers are creating a multitude of applications for resource-constrained systems, such as embedded devices. Many of these applications are written to be executed on virtual machines, such as the Java Virtual Machine (JVM). For each type of device that executes these applications, developers typically test applications on virtual machines which are configured to execute their applications on the device. However, because of resource limitations, it is difficult to fully test a virtual machine on many of these resource-constrained systems. For example, tests that rely on significant additional code are often not feasible due to memory constraints. Therefore, testing on many portions of the virtual machine are limited to ineffective “guess and check” testing methods.
One solution to the above-mentioned problem is to test the virtual machine outside of the resource-constrained system. However, this is problematic because resource-constrained systems generally lack some of the functionality that is present in devices that are not resource-constrained. Therefore, developers often try to implement this functionality by using the available resources and functions of the resource-constrained systems in unusually complex ways. As a result, it is difficult to test the added functionality of the virtual machine created for the resource-constrained system without the resource-constrained system. Furthermore, there is no way to test the resource-constrained system in real-world scenarios without the virtual machine. Therefore, testers perform most testing of the virtual machine in conjunction with the resource-constrained system.
One technique for testing an application that runs on a virtual machine on a resource-constrained system is to compile a profile of the application's execution. These profiling techniques typically operate by profiling operation-requests made by the application within the virtual machine. While this technique may detect the existence of a problem, such as bottleneck, it typically cannot determine whether the problem, exists in the application, the virtual machine, or the resource-constrained system.
Hence, what is needed is a technique for testing an application and an associated virtual machine on a resource-constrained system without the problems described above.